﻿#region Copyright (c) Roni Schuetz - All Rights Reserved
// * --------------------------------------------------------------------- *
// *                              Roni Schuetz                             *
// *              Copyright (c) 2008 All Rights reserved                   *
// *                                                                       *
// * Shared Cache high-performance, distributed caching and    *
// * replicated caching system, generic in nature, but intended to         *
// * speeding up dynamic web and / or win applications by alleviating      *
// * database load.                                                        *
// *                                                                       *
// * This Software is written by Roni Schuetz (schuetz AT gmail DOT com)   *
// *                                                                       *
// * This library is free software; you can redistribute it and/or         *
// * modify it under the terms of the GNU Lesser General Public License    *
// * as published by the Free Software Foundation; either version 2.1      *
// * of the License, or (at your option) any later version.                *
// *                                                                       *
// * This library is distributed in the hope that it will be useful,       *
// * but WITHOUT ANY WARRANTY; without even the implied warranty of        *
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      *
// * Lesser General Public License for more details.                       *
// *                                                                       *
// * You should have received a copy of the GNU Lesser General Public      *
// * License along with this library; if not, write to the Free            *
// * Software Foundation, Inc., 59 Temple Place, Suite 330,                *
// * Boston, MA 02111-1307 USA                                             *
// *                                                                       *
// *       THIS COPYRIGHT NOTICE MAY NOT BE REMOVED FROM THIS FILE.        *
// * --------------------------------------------------------------------- *
#endregion

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Web.Services.Protocols;

namespace SharedCache.WinServiceCommon.Attributes
{
	/// <summary>
	/// Create a SoapExtensionAttribute for a SOAP extension that can be applied to an XML Web service method. 
	/// </summary>
	[AttributeUsage(AttributeTargets.Method)]
	public class SharedCacheSoapExtensionAttribute : SoapExtensionAttribute
	{
		private int sec;
		/// <summary>
		/// Return the type of 'SharedCacheSoapExtensionAttribute' class.
		/// </summary>
		public override Type ExtensionType
		{
			get
			{
				return typeof(SharedCacheSoapExtension);
			}
		}
		/// <summary>
		/// User can set priority of the 'SoapExtension'.
		/// </summary>
		public override int Priority { get; set; }

		/// <summary>
		/// Define how much time Data should stay in cache.
		/// </summary>
		public int CacheInSecond
		{
			get
			{
				return sec;
			}
			set
			{
				sec = value;
			}
		}
	}
}
